/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.model.master;

import com.kmcsoft.emaster.entity.TrackableEntity;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 *
 * @author kmcsoft02
 */
@PersistenceCapable(detachable = "true", table = "shop_pawnRate")
public class PawnRate extends TrackableEntity implements Comparable<PawnRate> {

    @Persistent
    private int day;
    @Persistent
    private double rate;

    public PawnRate(int day) {
        this.day = day;
        this.rate=0;
    }

    public PawnRate() {
    }

    public int compareTo(PawnRate o) {
        if (getDay() > o.getDay()) {
            return -1;
        }
        if (getDay() < o.getDay()) {
            return 1;
        }
        return 0;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public double getRate() {
        return rate;
    }

    public void setRate(double rate) {
        this.rate = rate;
    }

    @Override
    public boolean equals(Object obj) {
        return this==obj;
    }
    
}
